package com.ruoyi;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;

import javax.servlet.MultipartConfigElement;

/**
 * 启动程序
 * 
 * @author ruoyi
 */
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
public class RuoYiApplication
{
    public static void main(String[] args)
    {
        // System.setProperty("spring.devtools.restart.enabled", "false");
        SpringApplication.run(RuoYiApplication.class, args);
        System.out.println("~ ~ ~ 企业考勤管理系统启动成功~ ~ ~  \n" +
                "  _____ ______   ____  ____  ______      __ __  _____   ___ \n" +
                " / ___/|      | /    ||    \\|      |    |  |  |/ ___/  /  _]\n" +
                "(   \\_ |      ||  o  ||  D  )      |    |  |  (   \\_  /  [_ \n" +
                " \\__  ||_|  |_||     ||    /|_|  |_|    |  |  |\\__  ||    _]\n" +
                " /  \\ |  |  |  |  _  ||    \\  |  |      |  :  |/  \\ ||   [_ \n" +
                " \\    |  |  |  |  |  ||  .  \\ |  |      |     |\\    ||     |\n" +
                "  \\___|  |__|  |__|__||__|\\_| |__|       \\__,_| \\___||_____|\n" +
                "                                                            \n"
        );
    }

    @Bean
    MultipartConfigElement multipartConfigElement() {
        MultipartConfigFactory factory = new MultipartConfigFactory();
        factory.setLocation("/home/ecs-user/ruoyi/uploadPath/");
        return factory.createMultipartConfig();
    }
}
